package com.cloud.code.stream;

import java.util.Date;
import java.util.Objects;

/**
 * 描述:
 * 模型
 *
 * @author 54485
 * @create 2018-09-20 15:54
 */
public class People {

    private String userName;

    private String passWord;

    private int age;

    private Date createDate;

    public People() {
    }

    public People(String userName, String passWord, int age, Date createDate) {
        this.userName = userName;
        this.passWord = passWord;
        this.age = age;
        this.createDate = createDate;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }


    @Override
    public String toString() {
        return "People{" +
                "userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", age=" + age +
                ", createDate=" + createDate +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        People people = (People) o;
        return Objects.equals(userName, people.userName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userName);
    }
}

